The present invention relates to an image processing apparatus and method of transmitting, e.g., input image data to an external device.
Conventionally, transmission of image data of an original (original image) such as a document read by, e.g., an image scanner to an external device via a communication network is generally performed. In this case, since the data transfer capacity of the communication network is limited, the size of data to be transmitted is preferably as small as possible. In recent years, allowing some loss of data received by the receiving-side device in advance, the resolution of image data to be transmitted is reduced before it is transmitted from the transmitting-side device, or irreversible image compression with a high compression efficiency is performed.
In such a case, however, if the image data to be transmitted contains image data of a character region, the loss of transmitted image data must be suppressed to recognize the data as characters in the image data reconstructed as an image on the receiving-side device.
To make the size of data to be transmitted as small as possible, ideally, it is preferable to accurately recognize all characters contained in the original and code them in character recognition by the transmitting-side device. In fact, it is difficult to perform character recognition for all objects to be recognized at the same level as the human recognition performance. Therefore, to prevent information omission or erroneous information transmission due to character recognition errors, the character portion must sometimes be transmitted as pixel data before coding.
For image data representing a drawing, graphic, or photograph other than characters, an image compression technique unsuitable for a character region is sometimes preferably employed when highly accurate information transmission is not required, or inversely, highly accurate reproducibility is particularly required for the drawing or photograph region.
Under this condition, image data having a small size on the communication network and capable of obtaining a satisfactory reconstructed image in the receiving-side device can be generated by dividing the original image into a character region and a non-character region and compressing the images by different methods in units of regions rather than by uniformly compressing the entire original image by a single image compression method.
From the above-described viewpoint, pixel data of a character region to be transmitted through a communication network is regarded as minimum information necessary for constructing (reconstructing) the data to an image that the user can recognize on the receiving-side device. When image compression is performed to delete information except the minimum necessary information on the transmitting-side device, data with the highest transmission efficiency can be generated.
However, the above-described conventional image processing apparatus has the following problem. Since reversible image compression without any information loss is performed for a character region, information which will be consequently wasted may be transmitted to the receiving-side device. Alternatively, when image compression such as resolution conversion with an information loss is performed for a character region, necessary information of a small character may be omitted, or conversely, unnecessary information of a large character may be transmitted in the user-recognizable character image reconstructed by the receiving-side device because the compression ratio is fixed.
To avoid this problem, image compression must be performed using different compression ratios in units of character regions contained in the original. However, when documents of various types or a quantity of documents are to be processed, it is impractical for the user to sequentially determine and change the compression ratio in units of document regions in the transmitting-side device. Hence, to efficiently transmit document information from the transmitting-side device, it is necessary to automatically select image conversion with an optimum compression ratio for each character region contained in the original on the basis of a concept that minimum necessary data that the user can recognize in the receiving-side device need be transmitted.
It is an object of the present invention to provide an image processing apparatus and method of transmitting pixel data representing a character image and having a minimum necessary size for reconstruction by an external device.
In order to achieve the above object, an image processing apparatus of the present invention has the following arrangement.
An image processing apparatus comprises compression means for compressing pixel data of a character image block at one of a plurality of predetermined compression ratios, character recognition means for performing character recognition for pixel data obtained by the compression means, compression ratio selection means for selecting one of the plurality of predetermined compression ratios on the basis of a recognition result from the character recognition means, and transmission means for transmitting, to an external device, pixel data obtained by compressing the pixel data of the character image block by the compression means at the compression ratio selected by the compression ratio selection means.
The character recognition means compares a feature vector represented by the pixel data of the character image block with each of feature vectors of a plurality of character types stored in advance and selects a character type having the highest degree of similarity in comparison as the recognition result.
The compression ratio selection means selects one of the plurality of predetermined compression ratios on the basis of a result of comparison between a value representing the degree of similarity obtained by the character recognition means and a predetermined threshold value.
The predetermined threshold value represents a minimum state wherein when an image represented by the pixel data of the character image block is reconstructed by the external device on the basis of the pixel data transmitted by the transmission means, the image can be recognized as a character.
When a plurality of character image blocks are present, the compression ratio selection means selects one of the plurality of predetermined compression ratios in units of character image blocks.
In order to achieve the above objects, an image processing method of the present invention has the following steps.
An image processing method comprises the compression step of compressing pixel data of a character image block at one of a plurality of predetermined compression ratios, the character recognition step of performing character recognition for pixel data obtained by data compression, the compression ratio selection step of selecting one of the plurality of predetermined compression ratios on the basis of a recognition result, and the transmission step of transmitting, to an external device, pixel data obtained by compressing the pixel data of the character image block at the selected compression ratio.
The character recognition step comprises comparing a feature vector represented by the pixel data of the character image block with each of feature vectors of a plurality of character types stored in advance and selecting a character type having the highest degree of similarity in comparison as the recognition result.
The compression ratio selection step comprises selecting one of the plurality of predetermined compression ratios on the basis of a result of comparison between a value representing the degree of similarity obtained in the character recognition step and a predetermined threshold value.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.